﻿/******************************************
 * ITESM CEM 12 de septiembre de 2010
 * Actividad Breakout 2a parte
 * Alejandro Jesús Morales Torres
 * Gerardo Samuel Cabello Montes de Oca
 * 1161376
 * 965042
 * *****************************************/
using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
using Microsoft.Xna.Framework.Net;
using Microsoft.Xna.Framework.Storage;

namespace BreakoutAlexMetal
{
    class Raqueta
    {
        private Texture2D raquetaImg;
        private Vector2 position;
        private Vector2 centro;
        //private float velocidad;
        private Vector2 velocidad;
        private int vidas;
        private bool vivo;

        public Raqueta(Texture2D imagen)
        {
            raquetaImg = imagen;
            centro = new Vector2(30.0f, 15.0f);
            //velocidad = 9.0f;
            velocidad = new Vector2(9.0f, 0);
            //position = new Vector2(363.0f, 600.0f);
            vidas = 3;
            vivo = true;
        }

        public void setPosition(Vector2 pos)
        {
            position = pos;
        }

        public Vector2 getPosition()
        {
            return position;
        }

        public Texture2D getImage()
        {
            return raquetaImg;
        }

        public void derecha()
        {
            position += velocidad;
        }

        public void izquierda()
        {
            position -= velocidad;
        }

        public void matar(int i)
        {
            vidas -= i;
            if (vidas <= 0)
                vivo = false;
        }

        public bool isVivo()
        {
            return vivo;
        }

        public int getVidas()
        {
            return vidas;
        }

    }


}
